package wqh.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import wqh.dao.XkSensorAlarmDao;
import wqh.domain.XkSensorAlarm;
import wqh.service.XkSensorAlarmService;

import java.util.List;

/**
 * Created by devts on 2017/1/5.
 */
@Service("xkSensorAlarmService")
public class XkSensorAlarmServiceImpl implements XkSensorAlarmService {

    private final XkSensorAlarmDao dao;

    @Autowired
    public XkSensorAlarmServiceImpl(XkSensorAlarmDao dao) {
        this.dao = dao;
    }

    public void save(XkSensorAlarm entity) {
        this.dao.save(entity);
    }

    public void update(XkSensorAlarm entity) {
        this.dao.update(entity);
    }

    public void delete(XkSensorAlarm entity) {
        this.dao.delete(entity);
    }

    public void deleteAll() {
        this.dao.deleteAll();
    }

    public List<XkSensorAlarm> findAll() {
        return this.dao.findAll();
    }

    public XkSensorAlarm findById(Long id) {
        return this.dao.findById(id);
    }

    @Override
    public void deleteBySensorIdAndDeviceId(XkSensorAlarm x) {
        this.dao.deleteBySensorIdAndDeviceId(x);
    }
}
